package com.un.ebs.workflow.domain;

import java.util.Date;

import com.un.ebs.workflow.enums.NodePassTypeEnum;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (WorkflowNodeInstance)表实体类
 *
 * @author liubo
 * @since 2020-08-23 18:30:48
 */
@Data
@Component
@TableName("tb_workflow_node_instance")
@SuppressWarnings("serial")
public class WorkflowNodeInstance extends Model<WorkflowNodeInstance> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "workflow_instance_id", length = 40, precision = 0)
    private String workflowInstanceId;

    @DbField(name = "node_id", length = 40, precision = 0)
    private String nodeId;

    @DbField(name = "node_pass_type", length = -1, precision = 0)
    private NodePassTypeEnum nodePassType;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at_name", length = 100, precision = 0)
    private String createAtName;

    @DbField(name = "create_remark", length = 500, precision = 0)
    private String createRemark;

    @DbField(name = "complete_at", length = 40, precision = 0)
    private String completeAt;

    @DbField(name = "complete_at_name", length = 100, precision = 0)
    private String completeAtName;

    @DbField(name = "complete_remark", length = 500, precision = 0)
    private String completeRemark;

    @DbField(name = "complete_time", length = -1, precision = 0)
    private Date completeTime;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @DbField(name = "parent_id", length = 40, precision = 0)
    private String parentId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}